
<div class="breadcrumb" style="margin-bottom: 0px;">
    <input type="button" value="运行" onclick="run()">
</div>

<div id="editor" class="span5">

</div>
<script>

    var editor = ace.edit("editor");
    var JavaScriptMode = ace.require("ace/mode/html").Mode;
    editor.session.setMode(new JavaScriptMode());
    editor.setTheme("ace/theme/twilight");

    $.ajax({
        url:"plugin/slide_html.html"
    }).done(function(e){
        editor.setValue(e);
    });
    function run(){
        var iframe=document.getElementById("show");
        iframe.contentWindow.document.open();
        iframe.contentWindow.document.write(editor.getValue());
        iframe.contentWindow.document.close();
    }
</script>
<iframe src="" id="show" frameborder="0" ></iframe>

<style>
    #editor,#show{
        width: 50%;;
        height: 500px;
        float: left;
    }
    #show{
        background: #fff;
    }
</style>